<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>blog</title>
</head>

<body>
<div style="width:600px; margin:20px; margin-left:80px; "><?php echo anchor('cate/cate','分类列表');?></div>
<div style="width:600px; margin:20px; margin-left:80px; "><?php echo anchor('blog/blogadd','添加博客')?></div>
<table style="border:1px; width:600px; margin-left:100px;">
	<?php foreach($blogs as $blog):?>
	<tr>
    	<td width="50%"><?php echo $blog['title']?></td>
        <td width="20%"><?php echo getCateName($cates, $blog['cid'])?></td>
        <td><?php echo anchor('blog/show/id/'.$blog['id'], '查看');?> | <?php echo anchor('blog/blogedit/id/'.$blog['id'], '修改');?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo anchor('blog/del/id/'.$blog['id'], '删除');?></td>
    </tr>
    <?php endforeach?>
</table>
</body>
</html>